package com.huawei.esdk.tp.device.smc;

import com.huawei.esdk.platform.commu.itf.ICXFSOAPProtocolAdapter;
import com.huawei.esdk.platform.exception.ProtocolAdapterException;
import com.huawei.esdk.tp.southcommu.cxf.gen.SmcExternal2SoapSouth;

public abstract class V1R1C01BaseCapability extends BaseCapability
{
    public V1R1C01BaseCapability(ICXFSOAPProtocolAdapter cxfSOAPProtocolAdapter)
    {
        super(cxfSOAPProtocolAdapter);
    }

    /**
     * 
     * @param requestMessage : 南向请求消息
     * @param srcMethod : 请求消息名称
     * @return ： 南向返回消息
     * @throws ProtocolAdapterException
     */
    @SuppressWarnings("unchecked")
    public <T1> T1 sendProtocolMessage(Object requestMessage, String srcMethod)
            throws ProtocolAdapterException
    {
        // send message to SMC
        T1 res = (T1) cxfSOAPProtocolAdapter.syncSendMessageWithCxf(
                requestMessage, SmcExternal2SoapSouth.class.getName(),
                srcMethod);
        return res;
    }
}
